<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Academia</title>



<script type="text/javascript" src="js/ajax.js"></script>

<script type="text/javascript" src="js/menu.js"></script>
<link type="text/css" rel="stylesheet" href="css/estilos.css" />

<link type="text/css" rel="stylesheet" href="css/menu.css" />



</head>
	<h:head>
		<title>#{msgs.title_sistema} - #{msgs.title_listaAluno}</title>
	</h:head>

	<br/>
	<h:body>
		<center>
			<h1> #{msgs.title_listaAluno} </h1>

		</center>
		
			<br/>
<br/>
<br/>


		<h:form>
			<h:panelGrid columns="3" >
			  
					<h:selectBooleanCheckbox value="#{alunoMBean.filtroNome }" />
					
					<h:outputText value="#{msgs.field_nome}"/>
					<h:inputText value="#{alunoMBean.filtroAluno.pessoa.nome }" /> 	
					
					<h:selectBooleanCheckbox value="#{alunoMBean.filtroCpf }" />
									
					<h:outputText value="#{msgs.field_cpf}"/>
					<h:inputText value="#{alunoMBean.filtroAluno.pessoa.cpf }" /> 		
				
					<h:selectBooleanCheckbox value="#{alunoMBean.filtroMatricula }" />
					<h:outputText value="#{msgs.field_matricula}"/>
					<h:inputText value="#{alunoMBean.filtroAluno.matricula }" />
					
					<h:selectBooleanCheckbox value="#{alunoMBean.filtroAll }" />
					<h:outputText value="#{msgs.field_lista_todos}"/>
									
			</h:panelGrid>

			<h:commandButton value="#{msgs.button_voltar}" action="#{alunoMBean.actionVoltar }" />
			<h:commandButton value="#{msgs.button_buscar}" action="#{alunoMBean.actionBuscar }" />
		</h:form>	
			
		<h:dataTable value="#{alunoMBean.listEntidade}" var="lista" border="1">
			<h:column>
				<f:facet name="header">
					<h:outputText value="#{msgs.head_column_nome}" />
				</f:facet>
				<h:outputText value="#{lista.pessoa.nome}" />
				<br />
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="#{msgs.head_column_matricula}" />
				</f:facet>
					<h:outputText value="#{lista.matricula}" />
					<br/>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="#{msgs.head_column_rg}" />
				</f:facet>
				<h:outputText value="#{lista.pessoa.rg}" />
				<br />

			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="#{msgs.head_column_cpf}" />
				</f:facet>
					<h:outputText value="#{lista.pessoa.cpf}" />
					<br/>
			</h:column>
			<h:column>
				<h:form>
					<h:commandLink  action="#{alunoMBean.actionAlterar }"  >
						<h:graphicImage id="image"
						   alt="button_alterar"
						   url="../imgs/editar.jpg">
						</h:graphicImage> 
						<f:setPropertyActionListener target="#{alunoMBean.entidade}" value="#{lista}" />
					</h:commandLink>
				</h:form>
			</h:column>
			<h:column>
				<h:form>
					<h:commandLink action="#{alunoMBean.actionRemover }" >
						<h:graphicImage id="image2"
						   alt="#{msgs.button_remover}"
						   url="../imgs/deletar.jpg">
						</h:graphicImage> 
						<f:setPropertyActionListener target="#{alunoMBean.entidade}" value="#{lista}" />
					</h:commandLink>
				</h:form>
			</h:column>
		</h:dataTable>
	</h:body>
</html>